{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from chemview.gg import *\n",
    "from chemview.install import enable_notebook\n",
    "import numpy as np\n",
    "enable_notebook()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(<chemview.widget.TrajectoryControls at 0x7fcf404556a0>,\n",
       " <chemview.widget.RepresentationViewer at 0x7fcf404556d8>)"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "xyz = np.random.rand(10, 10, 3)\n",
    "colors = (np.random.rand(10, 10) * 2**32).astype('int')\n",
    "\n",
    "gg = ggtraj(10, Aes(xyz_traj=xyz, colors=[\"Cl\"] * 10)) + GeomPoints()\n",
    "gg.display()\n",
    "#t, mm = gg.display()\n",
    "#t.attach(\"fullscreen\", mm)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAkAAAADYCAYAAAADMFwxAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAC51JREFUeJzt3c1r3PW+wPHPpKcLa5EqSFqi1qeWthqbVGo23VhOC0as\nLZTrQ1HBikvFP6EgBREERRBxIQhCBTcVjEUXRiRYcxbpWdwKnl5vGlNqUeOt9uEY4/zu4tjEmWQy\noyaZ/vp5vTZ1fk/z/ebThrdJNZWiKIoAAEiko90LAABYagIIAEhHAAEA6QggACAdAQQApCOAAIB0\nBBAAkI4AAgDSEUAAQDoCCABI52/teNOrKlfHv+NCO94aALjMrF27NkZHR5f0PSvt+FlglUol/t7x\nX//5547Kbwc75nwd068rM/d3dNQem/W68tvLBs9odN+s8/XHmzyvwX3F9PGY975m1zU6P328Und8\n1nUxo+6e+mfXP7Oof/b066jZc/3xZvc1Pd/xB6//w68b7XP++1p5dsP3jBava3Utf/X+Bvtp/bnF\nn1rvnPdG7TVF3XvMekaD843uqzR7XtRf3+x17fMq07/Of//Mb+O57+uYdXzu878/1xHzP6PR65n7\n6o43+jX+7HXVls4vm3W+9r5ljY5P31d/ff111Zrn1xy7tIa695j9eu73qH/2zOvavc3cX627v6i7\nvu796p47va5Z19d+bKefP+t4/cc06p576eNz6Xil7vjMH9yO387NXFOpuabjt7tmjnfUHF+25l+x\n1DniW2AAQDoCCABIRwABAOkIIAAgHQEEAKQjgACAdAQQAJCOAAIA0hFAAEA6AggASEcAAQDpCCAA\nIB0BBACkI4AAgHQEEACQjgACANIRQABAOgIIAEhHAAEA6QggACAdAQQApCOAAIB0BBAAkI4AAgDS\nEUAAQDoCCABIRwAtgO8vjLV7CQvmh4mv2r2EBfXj6RPtXsKCOn/yytrPxX9dYfv57/9t9xIW1MSx\nr9u9hAU1+o9v272EBXPs6IV2L6H0BNACmLh45QTQ//1wZQXQT9/8T7uXsKDOj11ZwfDvE1fWfC4e\nv7IC6Idj4+1ewoI6+Y/v2r2EBfNPAfSXCSAAIB0BBACkUymKoljqN129enWcOXNmqd8WALgMdXZ2\nxjfffLOk79mWAAIAaCffAgMA0hFAAEA6ixZAR44ciQ0bNsT69evjhRdemPOaZ555JtatWxc9PT1x\n7NixxVrKgmi2n08++SRWrVoVW7ZsiS1btsTzzz/fhlW2bv/+/dHZ2Rl33XVXw2vKMp9meynbbMbH\nx2P79u1xxx13RHd3d7zyyitzXleW+bSynzLN6Oeff46+vr7o7e2N7u7uOHDgwJzXlWE+reylTLO5\npFqtxpYtW2LXrl1zni/DbH5vvv2UbT4333xzbN68OXp7e+Oee+6Z85olm0+xCH799dfitttuK0ZH\nR4vJycli8+bNxRdffFFzzcDAQNHf318URVEcPXq06OvrW4ylLIhW9jM4OFg88MADbVrhH/fpp58W\nIyMjRXd395znyzSfZnsp22xOnz5djIyMFEVRFD/99FOxfv36Uv/5aWU/ZZvR+fPni6IoiqmpqaKv\nr6/4/PPPa86XaT7N9lK22RRFUbz00kvFvn375lx3mWZzyXz7Kdt8brnllmJiYqLh+aWcz6J8BWh4\neDjWrVsXa9eujeXLl8fDDz8chw8frrnm8OHD8fjjj0dERF9fX5w9e/ay/S/DWtlPRERRor9Pvm3b\ntrj22msbni/TfJrtJaJcs1m9enX09PRERMTKlStj48aNcerUqZpryjSfVvYTUa4ZrVixIiL+8xWU\nqampqFQqNefLNJ9me4ko12zGx8djYGAgnnrqqTnPl2k2Ec33E1Gu+RRFEdVqteH5pZzPogTQqVOn\n4sYbb5x+fcMNN8z6hFd/TVdX15yfFC8HrewnIuKzzz6Lnp6euP/+++P48eNLucQFV6b5tKKssxkd\nHY1jx45FX19fzfGyzqfRfiLKNaNqtRq9vb2xevXq2LFjR2zdurXmfJnm02wvEeWazXPPPRcvvvji\nnCEXUa7ZRDTfT0S55lOpVKZ/n73xxhuzzi/lfP62KE9N6O67746xsbFYsWJFfPDBB7F79+748ssv\n270soryzOXfuXOzduzdefvnlWLlyZbuX85fNt5+yzaijoyNGRkbixx9/jN27d8fx48dj06ZN7V7W\nn9JsL2Wazfvvvx+dnZ3R09MTg4ODpfrKyFxa2U+Z5hMRMTQ0FGvWrIlvv/02duzYERs3boxt27a1\nZS2L8hWgrq6uGBub+flY4+Pj0dXVNeuar7/+et5rLhet7GflypXTX0q+77774pdffomJiYklXedC\nKtN8minjbKampmLv3r3x2GOPxYMPPjjrfNnm02w/ZZxRRMQ111wT9957bxw5cqTmeNnmE9F4L2Wa\nzdDQULz33ntx6623xiOPPBIff/zx9LdTLinTbFrZT5nmExGxZs2aiIi4/vrrY8+ePTE8PFxzfinn\nsygBtHXr1jhx4kScPHkyJicn49ChQ7P+9vquXbvirbfeioiIo0ePxqpVq6Kzs3MxlvOXtbKf33+P\ncnh4OIqiiOu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QEEAKQjgACAdAQQAJCOAAIA0hFAAEA6AggASEcAAQDpCCAA\nIB0BBACkI4AAgHQEEACQjgACANIRQABAOgIIAEhHAAEA6QggACAdAQQApCOAAIB0BBAAkI4AAgDS\nEUAAQDoCCABIRwABAOkIIAAgHQEEAKQjgACAdAQQAJCOAAIA0hFAAEA6AggASEcAAQDpCCAAIB0B\nBACkI4AAgHQEEACQjgACANIRQABAOgIIAEhHAAEA6QggACAdAQQApCOAAIB0BBAAkI4AAgDSEUAA\nQDoCCABIRwABAOkIIAAgHQEEAKQjgACAdAQQAJCOAAIA0hFAAEA6AggASEcAAQDpCCAAIB0BBACk\nI4AAgHQEEACQjgACANIRQABAOgIIAEjn/wGe/P4FExtg8gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<IPython.core.display.Image object>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAiQAAAA8CAYAAABW6aGvAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAByFJREFUeJzt3c+LZFcVwPHvqZ4k5AcEf0ASMk6CuBBXo4uJMoEoqMQI\nZhNQEAIuRERRXIgQhPwJorgSIxh/gxAdiEICceNixkanTcwPnXHMjAmZITozxGQ6EJzjol7/elWv\n3qvusm/f5vuBpvq9e+7te/p0V59+VdUdmYkkSVJJo9IbkCRJsiGRJEnF2ZBIkqTibEgkSVJxNiSS\nJKm4AzuZfH3cmG9yZVF7kSRJ9TubmXfOOyl28rLfiMiPxgMQ4wstMYpmYPox68fRnB5tOWbiuInr\nmN85b2K8fb5nvY55uX5+yydh6u1E7MDx9fPROj8R116Xqeu212vP2zhmS87t833zesdHHfGD1hx6\n3JXrztbtjGNg3MD1tj1/8xg7XTu3teeJea19ZStucv708a550bce7fjZx9PWjPXb2WtsfOlPnzea\nOD97fETPeMfxxrzW+a5btht3der4tJiliTW2zl3qOr8+rx3fjru6Zf3147WP31p/8nj6+p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TuhdszLU2L2\niiH5AHyoucz0eES8b3e29n9RU22Gqq42EXEn4ys/J1pDVdZnRj5QUX2aS+gngfPAk5m53Aqpqj4D\n8oF66vMt4OtMb6qgstrQnw/UUxsY5/FkRCxHxOenjM9dH5/UOt0fgUOZeRj4LvCrwvvRhupqExE3\nAb8EvtpcWahaTz5V1Sczr2bm+4GDwF0V/BCYaUA+VdQnIj7J+I9rrTD+TbymKwcTBuZTRW02OZqZ\nH2B81edLEXH3Thcc0pC8DBzadHywOdeOeVdPzF7Rm09mvr526TMzfwtcExFv370tLlRNtelVW20i\n4gDjH94/ysxfTwmpqj59+dRWnzWZ+RrwO+De1lBV9VnTlU9F9TkKfCoizgA/Az4SEY+2YmqqTW8+\nFdUGgMx8pbl9FXiM8dMhNpu7PkMakmXgPRFxR0RcC3wGaD9D+BjwIEBEfBC4nJkXBqxdQm8+mx/n\niogjjP+i7cXd3eZcZv0GUVNt1nTmU2FtfgA8l5nf7hivrT4z86mpPhHxzoi4uXn/euBjwAutsGrq\nMySfWuqTmQ9l5qHMfDfj++inMvPBVlg1tRmSTy21AYiIG5orpUTEjcDHgb+0wuauz4G+D5yZ/42I\nLwNPMG5gHsnM5yPiC+Ph/F5m/iYi7ouI08AbwOfmzG/XDMkHeCAivgi8BawCny6349ki4qfAh4F3\nRMQ54GHgWiqsDfTnQ121OQp8FnimeVw/gYcYv8KruvoMyYeK6gPcBvwwIkaM7wt+0dSjyvs2BuRD\nXfWZUHFtpqq4NrcAj0VEMu4jfpKZT+y0Pv4vG0mSVJxPapUkScXZkEiSpOJsSCRJUnE2JJIkqTgb\nEkmSVJwNiSRJKs6GRJIkFfc/BT/yg6Yz4usAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7fcf404fb5f8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "xyz = np.random.rand(10, 10, 3)\n",
    "colors_traj = (np.random.rand(10, 10) * 2**32).astype('int')\n",
    "#colors = np.arange(10).astype('float')\n",
    "\n",
    "gg = ggtraj(10, Aes(xyz_traj=xyz, colors_traj=colors_traj)) + GeomPoints() + ScaleColorsGradient(limits=[0, 5], palette=\"viridis\")\n",
    "\n",
    "t, mm = gg.display()"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.1"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
